<?php
echo $this->Rss->items($posts, 'transformRSS');

function transformRSS($post) {
	$html = new HtmlHelper();
	return array(
		'title' => $post['Post']['title'],
		'link' => $html->url(
			array(
				'admin'      => false,
				'plugin'     => 'lil_blogs',
				'controller' => 'posts',
				'action'     => 'view',
				'blog'       => $post['Blog'][Configure::read('LilBlogs.blogSlugField')],
				'post'       => $post['Post']['slug']
			),
			true
		),
		'guid'  => $html->url(
			array(
				'admin'      => false,
				'plugin'     => 'lil_blogs',
				'controller' => 'posts',
				'action'     => 'view',
				$post['Post']['id']
			),
			true
		),
		'description' => $post['Post']['body'],
		'author' => $post['Author'][Configure::read('Lil.authorDisplayField')],
		'pubDate' => $post['Post']['created']
	);
}
?>